package com.simple.rpc.registry.zookeeper;

import com.simple.rpc.config.ServiceConfig;
import com.simple.rpc.exporter.AbstractServiceExporter;
import com.simple.rpc.component.registry.Registry;

/**
 * zk发布器
 *
 * @author mhh
 * @since 2020/10/20
 */
public class ZookeeperExporter extends AbstractServiceExporter {

    private Registry registry;

    @Override
    public void export(ServiceConfig serviceConfig) {
        registry.registry(serviceConfig);
    }

    @Override
    public void unExport(ServiceConfig serviceConfig) {
        registry.offline(serviceConfig);
    }
}
